home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 272_01 / getcode.doc < prev    next >
Text File  |  1986-11-01  |  985b  |  39 lines

  1.  
  2.  
  3.         NAME
  4.                 get_code_adr -- get a function address
  5.  
  6.         SYNOPSIS
  7.                 void get_code_adr(function, segment, offset);
  8.                 int *function;     name of function
  9.                 int *segment;      destination of segment value
  10.                 int *offset;       destination of offset value
  11.  
  12.  
  13.         DESCRIPTION
  14.         This function is used to get the absolute segment and offset
  15.         values for the address of a function within a program.
  16.         It is useful for installing interrupt handlers and
  17.         interfacing to assembly language modules.
  18.  
  19.  
  20.  
  21.         EXAMPLE
  22.  
  23.                somefunc() {
  24.                         }
  25.  
  26.                main() {
  27.                  int segment, offset;
  28.                  getcode(&somefunc, &segment, &offset);
  29.                  printf("Address is %x:%x\n", segment, offset);
  30.                  }
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.         This function is found in SMDLx.LIB for the Datalight Compiler
  39.